#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char **argv)
{
    FILE *fp = NULL;

    char rTmp[1024] = {0};

    if (argc<2){
        printf("Usage: %s sourcefile\n", argv[0]);
        exit(-1);
    }

    if ((fp = fopen(argv[1],"r")) == NULL){

        printf("openfile error\n");
        exit(-2);
    }

    while(!feof(fp)){

        char findfile[12] = "000";

        fgets(rTmp,1024,fp);

//        printf("%s",rTmp);
        findfile[0] = rTmp[0];
        findfile[1] = rTmp[1];
        findfile[2] = rTmp[2];


        if ((findfile[0] == '#') && (findfile[1] == '#') && (findfile[2] == ' '))
            printf("%s", rTmp);

        //printf("%d\n", result);



    }

    fclose(fp);

}
